//
//  UILabel+Extension.swift
//  微博
//
//  Created by mac on 15/12/17.
//  Copyright © 2015年 mac. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(content:String,color:UIColor,fontSize:CGFloat,marigin:CGFloat = 0) {
        self.init()
        text = content
        textColor = color
        font = UIFont.systemFontOfSize(fontSize)
        numberOfLines = 0
        textAlignment = .Center
        if marigin > 0 {
            preferredMaxLayoutWidth = screenWidth - 2 * marigin
            textAlignment = .Left
        }
        
        sizeToFit()
    }
    
    
    
    
    
}





